package com.xunda.ui;

import com.xunda.adapter.MainUIAdapter;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.GridView;

public class MainActivity extends Activity implements OnItemClickListener {

	private static final String tag = "MainActivity";
	private GridView gv_main;
	private MainUIAdapter adapter;
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		setContentView(R.layout.main);
		gv_main=(GridView) this.findViewById(R.id.gv_main);
		adapter=new MainUIAdapter(this);
	    gv_main.setAdapter(adapter); 
	    gv_main.setOnItemClickListener(this);
		
	}
	@Override
	public void onItemClick(AdapterView<?> arg0, View arg1, int position, long id) {
		// TODO Auto-generated method stub
		switch (position) {
		case 0:
	    Intent intent=new Intent(MainActivity.this,MyLocation.class);
	    startActivity(intent);
//	    finish();
			break;

		}
	}

  public void listenbt1(View view){
	  
	  
  }
public void listenbt2(View view){
	  
	  
  }
}
